#include<bits/stdc++.h>
using namespace std;
const long long MOD = 1e9+7;
typedef long long ll;
ll n;
ll ans;
void solve() {
  ll i;
  for(i=1; i*i<n; ++i) {
    if(n%i==0) {
      (ans+=i)%=MOD;
      (ans+=n/i)%=MOD;
    }
  }
  if(i*i==n) {
    (ans+=i)%=MOD;
  }
  cout<<ans<<'\n';
}
int main() {
  cin>>n;
  solve();
}